<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<html lang="en-us" xml:lang="en-us">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="DC.Type" content="topic">
  <meta name="DC.Title" content="Step 5: (Optional) Configuring Log Backup">
  <meta name="product" content="">
  <meta name="DC.Relation" scheme="URI" content="en-us_topic_0000001839188597.html">
  <meta name="prodname" content="">
  <meta name="version" content="">
  <meta name="brand" content="30-OceanProtect Appliance 1.5.0-1.6.0 Help Center">
  <meta name="DC.Publisher" content="20240608">
  <meta name="DC.Format" content="XHTML">
  <meta name="DC.Identifier" content="EN-US_TOPIC_0000001792389536">
  <meta name="DC.Language" content="en-us">
  <link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
  <title>Step 5: (Optional) Configuring Log Backup</title>
 </head>
 <body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px">
  <a name="EN-US_TOPIC_0000001792389536"></a><a name="EN-US_TOPIC_0000001792389536"></a>
  <h1 class="topictitle1">Step 5: (Optional) Configuring Log Backup</h1>
  <div>
   <p>If log backup is configured in <a href="en-us_topic_0000001839268545.html">Step 4: Creating a Backup SLA</a>, enable log backup for the SAP HANA database by following the instructions provided in this section for log backup to take effect. Skip this section in other scenarios.</p>
   <div class="section">
    <h4 class="sectiontitle">Context</h4>
    <p>The SAP HANA database log backup function provided by the <span>product</span> depends on the log backup capability of SAP HANA. After SAP HANA logs are backed up, they are backed up to the backup storage by the <span>product</span>.</p>
   </div>
   <div class="section">
    <h4 class="sectiontitle">Procedure</h4>
    <ol>
     <li><span>Log in to the system database.</span><p></p>
      <ol type="a">
       <li>Use PuTTY to log in to the SAP HANA database host.</li>
       <li>Run the following command to switch to the system user:<pre class="screen">su - <em>systemi</em><em>d</em>adm</pre> <p>Example:</p> <pre class="screen">su - k00adm</pre></li>
       <li>Run the following command to log in to the system database:<pre class="screen">hdbsql -i <em>Instance ID</em> -n <em>Host name of the master node of the system database</em>:<em>SQL Port of the system database</em> -d SYSTEMDB -u <em>Username of the system database</em> -p <em>Password of the system database</em></pre> <p>Example:</p> <pre class="screen">hdbsql -i 00 -n localhost:30013 -d SYSTEMDB -u SYSTEM -p xxxxxxx</pre></li>
      </ol> <p></p></li>
    </ol>
    <ol start="2">
     <li><span>Enable and configure the log backup function.</span><p></p>
      <ol type="a">
       <li>Run the following command to enable SAP HANA database log backup:<pre class="screen">alter system alter configuration ('global.ini', 'SYSTEM') set ('persistence', 'enable_auto_log_backup') = 'yes' with reconfigure;</pre></li>
       <li>Run the following command to set the directory for storing log backup copies:
        <div class="p">
         Ensure that the usable space of the log backup copy directory is greater than the space to be occupied by all log backup copies.
         <pre class="screen">alter system alter configuration ('global.ini', 'SYSTEM') set ('persistence', 'basepath_logbackup') = '<em>Directory for storing log backup copies</em>'  with reconfigure;</pre>
        </div></li>
       <li>Run the following command to set the log backup frequency, that is, the interval for backing up logs:<pre class="screen">alter system alter configuration ('global.ini', 'SYSTEM') set ('persistence', 'log_backup_timeout_s') = '<em>Log backup interval</em><em>(s)</em>' with reconfigure;</pre> <p>It is recommended that the interval be 50% to 100% of the log backup interval set in <a href="en-us_topic_0000001839268545.html#EN-US_TOPIC_0000001839268545__table2663151516335">Table 1</a>. If the log backup interval is set to 60 minutes in the backup policy, you are advised to set the interval to a value ranging from 30 to 60 minutes.</p></li>
      </ol> <p></p></li>
    </ol>
   </div>
   <p></p>
  </div>
  <div>
   <div class="familylinks">
    <div class="parentlink">
     <strong>Parent topic:</strong> <a href="en-us_topic_0000001839188597.html">Backing Up an SAP HANA Database</a>
    </div>
   </div>
  </div>
 </body>
</html>